-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
cli: support ${pid}
placeholder in --cpu-prof-name
#59072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
I didn’t modify the affected section in cli.md, but the build fails with a link not found error. It seems to be an issue related to the documentation build tooling or other files, not my changes. |
Please run |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #59072 +/- ##
==========================================
- Coverage 90.06% 90.05% -0.02%
==========================================
Files 645 648 +3
Lines 189130 190991 +1861
Branches 37094 37435 +341
==========================================
+ Hits 170339 171988 +1649
- Misses 11511 11630 +119
- Partials 7280 7373 +93
🚀 New features to boost your workflow:
|
This reverts commit 3b529fc.
b3b8067
to
89d051b
Compare
${pid}
placeholder in --cpu-prof-name${pid}
placeholder in --cpu-prof-name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding a test like https://github.com/nodejs/node/blob/main/test/sequential/test-cpu-prof-dir-and-name.js? Thank you
Co-authored-by: Chengzhong Wu <[email protected]>
Co-authored-by: Chengzhong Wu <[email protected]>
Hi @legendecas, thank you for the earlier feedback. I’ve added a new test to It follows the same spirit as Let me know if this approach looks good to you or if you'd prefer it in a separate test file. Thanks. |
7d7fe9d
to
09a2458
Compare
All feedback has been addressed and all checks have passed. |
Co-authored-by: Daeyeon Jeong <[email protected]>
I noticed the test build failed, but I’m not sure about the exact cause. Could you please help me understand why this happened? |
Jenkins CI tests fail fairly often due to flakiness or timeouts unrelated to changes. Collaborators will likely retry after checking. |
Thanks for the explanation! |
This patch adds support for runtime substitution of the ${pid} placeholder
in the --cpu-prof-name option. This is helpful when using cluster/forked
processes to avoid profile file name collisions.
Previously, patterns like ${pid} were not substituted. Now, ${pid} will
be replaced with the current process ID.
Example:
node --cpu-prof --cpu-prof-name 'CPU.${pid}.cpuprofile' index.js
Generates: CPU.12345.cpuprofile
Also updated the CLI documentation accordingly.
Fixes: #57418